﻿using Microsoft.AspNetCore.Mvc;

using System.ComponentModel.DataAnnotations;

namespace SRM.WebSite.Models.Account
{
    public class RegisterViewModel
    {
        [Remote(action: "IsUserName", controller: "Account")]
        [Required(ErrorMessage = "用户名不能为空")]
        [Display(Name = "用户名")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "密码不能为空")]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "确认密码")]
        [Compare("Password", ErrorMessage = "密码与确认密码不一致，请重新输入。")]
        public string ConfirmPassword { get; set; }

        [Display(Name = "创建供应商")]
        public bool IsSupplier { get; set; }

        /// <summary>
        /// 供应商Id
        /// </summary>
        public int SupplierId { get; set; }

        /// <summary>
        /// 供应商编码
        /// </summary>
        public string SupplierNo { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        public string SupplierName { get; set; }
    }
}
